package com.ruoyi.shop.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.shop.api.domain.CheDrawal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteDrawalService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteDrawalService {

    /**
     * 查询商家提现记录列表
     */
    @GetMapping("/drawal/list")
    TableDataInfo list(CheDrawal cheDrawal, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 导出商家提现记录列表
     */
//    @PostMapping("/export")
//    byte[] export(@RequestBody CheDrawal cheDrawal, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 查询商家提现记录列表（不分页）
     */
    @GetMapping("/listNoPage")
    TableDataInfo listNoPage(CheDrawal cheDrawal);

    /**
     * 获取商家提现记录详细信息
     */
    @GetMapping(value = "/drawal/{drawalId}")
    AjaxResult getInfo(@PathVariable("drawalId") Long drawalId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 新增商家提现记录
     */
    @PostMapping
    AjaxResult add(@RequestBody CheDrawal cheDrawal, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 修改商家提现记录
     */
    @PutMapping
    AjaxResult edit(@RequestBody CheDrawal cheDrawal, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 删除商家提现记录
     */
    @DeleteMapping("/{drawalIds}")
    AjaxResult remove(@PathVariable("drawalIds") Long[] drawalIds, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
